Called when user presses a keyboard key and popup is open.

<div class="definition">
    onKeydown = function(event)
</div>

The event will only be triggered if <a href="w2popup.keyboard" class="property">.keyboard</a> property of the sidebar is true.
<div style="height: 10px;"></div>

You can add event listener during the object creation:

<textarea class="javascript">
w2popup.open({
    title     : 'Title',
    body      : 'Body',
    onKeydown : function (event) {
        console.log('event: ' + event.type, event);
    }        
});
</textarea>

or after popup is opened:

<textarea class="javascript">
w2popup.on('keydown', function(event) {
    console.log('event: ' + event.type, event);
});
</textarea>

The event handler is called before the default action of the event is triggered. You can cancel the default action by calling
<span class="method">event.preventDefault()</span>. To perform an action 
after the event is fully processed, define <span class="method">event.onComplete</span> function. 
<div style="height: 10px;"></div>
See <a href="utils/events">events</a> page in utilities for more details.